import request from '@/utils/request'
// 保存控制计划
export function saveQualityPlan(data) {
  return request({
    url: '/md/monopy/qualityPlans/saveQualityPlan',
    method: 'post',
    data
  })
}

export function queryQualityPlan(data) {
  return request({
    url: `/md/monopy/qualityPlans/selectQualityPlanPage`,
    method: 'post',
    data
  })
}

// 质控计划明细查询
export function queryQualityPlanDetail(data) {
  return request({
    url: `/md/monopy/qualityPlans/query`,
    method: 'post',
    data
  })
}

export function batchRemove(data) {
  return request({
    url: `/md/monopy/qualityPlans/deleteList`,
    method: 'delete',
    data
  })
}
/**
 * 获取质量控制计划维护自定义数据
 * @param getQualityPlanCustomData
 */
export function getQualityPlanCustomData(data) {
  return request({
    url: `/md/monopy/qualityPlans/getQualityPlanCustomData`,
    method: 'get',
    params: { data }
  })
}
/**
 * 查询控制质量数据
 * @param inquire
 */
export function inquireQualityPlans(qualityPlans) {
  return request({
    url: `/md/monopy/qualityPlans/query`,
    method: 'get',
    params: qualityPlans
  })
}

/**
 * 保存或新增控制质量明细数据
 * @param data
 */
export function saveQualityPlans(data) {
  return request({
    url: `/md/monopy/qualityPlans/save`,
    method: 'post',
    data
  })
}

/**
 * 删除控制质量数据
 * @param delete
 */
export function deleteQualityPlans(data) {
  return request({
    url: `/md/monopy/qualityPlans/delete`,
    method: 'get',
    params: data
  })
}

export function createCode() {
  return request({
    url: `/md/monopy/qualityPlans/getNewsNumber`,
    method: 'get'
  })
}
